home *** CD-ROM | disk | FTP | other *** search
Wrap
/* File: IncomingHFSStream.h Contains: Written by: David Akhond Copyright: © 1995 by Apple Computer, Inc., all rights reserved. Change History (most recent first): To Do: */ #ifndef __IncomingHFSStream__ #define __IncomingHFSStream__ #ifndef __FileUtils__ #include "FileUtils.h" #endif #ifndef __STRINGS__ #include "Strings.h" #endif enum LetterPos { eNone, eFromRecips, eToRecips, eCCRecips, eBccRecips, eBody }; const OSType kLetterType = 'TEXT'; const OSType kLetterCreator = 'ttxt'; const long kMaxLineLen = 512; class CIncomingHFSStream { public: CIncomingHFSStream(CFile* theLetterFile); ~CIncomingHFSStream(); void FromRecipient(char* author); Boolean NextToRecipient(char* nextToRecipient); Boolean NextCCRecipient(char* nextCCRecipient); Boolean NextBCCRecipient(char* nextBCCRecipient); Boolean BodyText( char* textBuff, long* count ); // on entry, count is the size of textBuff; on exit, the count of chars returned in textBuff. return value is true if this is the last buffer of text in the file void FromField(); // get the From: field for processing void ToField(); void CCField(); void BCCField(); void BodyField(); char fFromRecipient[64]; private: CFile* fLetterFile; long fStreamPos; char fTempRecipient[64]; char fLineBuf[kMaxLineLen]; long fLineBufLen; long fLineBufPos; short fLetterPos; }; #endif